{% extends 'myadmin/public/base.html' %}

{% block title %}
<title>订单列表</title>
{% endblock %}

{% block con %}
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title  am-cf">订单列表</div>
                </div>
                <div class="widget-body  am-fr">

                    <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                        <div class="am-form-group">
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs" style="color: white">
                                    <button type="button" class="am-btn am-btn-default am-btn-success"><a href="{% url "myadmin_goods_add" %}"><span class="am-icon-plus"></span> 新增</a></button>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                            <thead>
                                <tr>
                                    <th>下单时间</th>
                                    <th>订单号</th>
                                    <th>用户</th>
                                    <th>状态</th>
                                    <th>总金额</th>
                                    <th>查看</th>
                                    <th>编辑</th>

                                </tr>
                            </thead>
                            <tbody>
                              {% for v in orderlist %}
                              <tr>
                                    <td class="am-text-middle">{{ v.addtime|date:'Y-m-d H:i:s'}}</td>
                                    <td class="am-text-middle">{{ v.id }}</td>
                                    <td class="am-text-middle">{{ v.uid.username }}</td>
                                    <td class="am-text-middle status">
                                        {% if v.status == 0 %}
                                            已发货
                                        {% elif v.status == 1 %}
                                            已付款，未发货
                                        {% else %}
                                            未付款
                                        {% endif %}
                                    </td>
                                    <td class="am-text-middle">{{ v.totalprice }}</td>
                                    <td class="am-text-middle"><a href="{% url 'myadmin_order_info' v.id %}">详情</a></td>
                                    <td class="am-text-middle"><a href="{% url 'myadmin_order_edit' v.id %}">编辑</a></td>
                              </tr>
                              {% endfor %}
                                <!-- more data -->
                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">

                        <div class="am-fr">
                            <ul class="am-pagination tpl-pagination">

                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{% endblock %}

{% block js %}

<script type="text/javascript">
    
    $('.status').click(function(){



    })



</script>

{% endblock %}


